using Easislides.Properties;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Easislides
{
	public class FrmBackground : Form
	{
		private IContainer components = null;
		private Button OkBtn;
		private Button Colour1Btn;
		private Button Colour2Btn;
		private Button CancelBtn;
		private PictureBox pictureBox0;
		private GroupBox groupBox1;
		private GroupBox groupBox2;
		private Panel panel0;
		private Panel panel1;
		private PictureBox pictureBox1;
		private Panel panel2;
		private PictureBox pictureBox2;
		private Panel panel7;
		private PictureBox pictureBox7;
		private Panel panel6;
		private PictureBox pictureBox6;
		private Panel panel5;
		private PictureBox pictureBox5;
		private Panel panel4;
		private PictureBox pictureBox4;
		private Panel panel3;
		private PictureBox pictureBox3;
		private Panel panel8;
		private PictureBox pictureBox8;
		private CheckBox checkBoxColour2;
		private GroupBox groupBox4;
		private GroupBox groupBox3;
		private Panel panel9;
		private PictureBox pictureBox9;
		private Panel panel10;
		private PictureBox pictureBox10;
		private Button SwapBtn;
		private Panel panel11;
		private PictureBox pictureBox11;
		private ToolTip toolTip1;
		private Color InColour1;
		private Color InColour2;
		private int SelectedStyle;
		private int PicWidth = 80;
		private int PicHeight = 60;
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            this.OkBtn = new System.Windows.Forms.Button();
            this.Colour1Btn = new System.Windows.Forms.Button();
            this.Colour2Btn = new System.Windows.Forms.Button();
            this.CancelBtn = new System.Windows.Forms.Button();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.groupBox4 = new System.Windows.Forms.GroupBox();
            this.SwapBtn = new System.Windows.Forms.Button();
            this.checkBoxColour2 = new System.Windows.Forms.CheckBox();
            this.groupBox3 = new System.Windows.Forms.GroupBox();
            this.groupBox2 = new System.Windows.Forms.GroupBox();
            this.panel11 = new System.Windows.Forms.Panel();
            this.panel9 = new System.Windows.Forms.Panel();
            this.panel10 = new System.Windows.Forms.Panel();
            this.panel8 = new System.Windows.Forms.Panel();
            this.panel7 = new System.Windows.Forms.Panel();
            this.panel6 = new System.Windows.Forms.Panel();
            this.panel5 = new System.Windows.Forms.Panel();
            this.panel4 = new System.Windows.Forms.Panel();
            this.panel3 = new System.Windows.Forms.Panel();
            this.panel2 = new System.Windows.Forms.Panel();
            this.panel1 = new System.Windows.Forms.Panel();
            this.panel0 = new System.Windows.Forms.Panel();
            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
            this.pictureBox11 = new System.Windows.Forms.PictureBox();
            this.pictureBox9 = new System.Windows.Forms.PictureBox();
            this.pictureBox10 = new System.Windows.Forms.PictureBox();
            this.pictureBox8 = new System.Windows.Forms.PictureBox();
            this.pictureBox7 = new System.Windows.Forms.PictureBox();
            this.pictureBox6 = new System.Windows.Forms.PictureBox();
            this.pictureBox5 = new System.Windows.Forms.PictureBox();
            this.pictureBox4 = new System.Windows.Forms.PictureBox();
            this.pictureBox3 = new System.Windows.Forms.PictureBox();
            this.pictureBox2 = new System.Windows.Forms.PictureBox();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.pictureBox0 = new System.Windows.Forms.PictureBox();
            this.groupBox1.SuspendLayout();
            this.groupBox4.SuspendLayout();
            this.groupBox3.SuspendLayout();
            this.groupBox2.SuspendLayout();
            this.panel11.SuspendLayout();
            this.panel9.SuspendLayout();
            this.panel10.SuspendLayout();
            this.panel8.SuspendLayout();
            this.panel7.SuspendLayout();
            this.panel6.SuspendLayout();
            this.panel5.SuspendLayout();
            this.panel4.SuspendLayout();
            this.panel3.SuspendLayout();
            this.panel2.SuspendLayout();
            this.panel1.SuspendLayout();
            this.panel0.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox11)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox0)).BeginInit();
            this.SuspendLayout();
            // 
            // OkBtn
            // 
            this.OkBtn.Location = new System.Drawing.Point(212, 15);
            this.OkBtn.Name = "OkBtn";
            this.OkBtn.Size = new System.Drawing.Size(76, 25);
            this.OkBtn.TabIndex = 0;
            this.OkBtn.Text = "OK";
            this.OkBtn.Click += new System.EventHandler(this.OkBtn_Click);
            // 
            // Colour1Btn
            // 
            this.Colour1Btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.Colour1Btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Colour1Btn.Location = new System.Drawing.Point(7, 9);
            this.Colour1Btn.Name = "Colour1Btn";
            this.Colour1Btn.Size = new System.Drawing.Size(61, 22);
            this.Colour1Btn.TabIndex = 0;
            this.Colour1Btn.Text = "Colour 1";
            this.Colour1Btn.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Colour1_MouseUp);
            // 
            // Colour2Btn
            // 
            this.Colour2Btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.Colour2Btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Colour2Btn.Location = new System.Drawing.Point(22, 9);
            this.Colour2Btn.Name = "Colour2Btn";
            this.Colour2Btn.Size = new System.Drawing.Size(61, 22);
            this.Colour2Btn.TabIndex = 1;
            this.Colour2Btn.Text = "Colour 2";
            this.Colour2Btn.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Colour2_MouseUp);
            // 
            // CancelBtn
            // 
            this.CancelBtn.Location = new System.Drawing.Point(294, 15);
            this.CancelBtn.Name = "CancelBtn";
            this.CancelBtn.Size = new System.Drawing.Size(76, 25);
            this.CancelBtn.TabIndex = 1;
            this.CancelBtn.Text = "Cancel";
            this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.groupBox4);
            this.groupBox1.Controls.Add(this.groupBox3);
            this.groupBox1.Controls.Add(this.OkBtn);
            this.groupBox1.Controls.Add(this.CancelBtn);
            this.groupBox1.Location = new System.Drawing.Point(9, 241);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(384, 47);
            this.groupBox1.TabIndex = 0;
            this.groupBox1.TabStop = false;
            // 
            // groupBox4
            // 
            this.groupBox4.Controls.Add(this.SwapBtn);
            this.groupBox4.Controls.Add(this.checkBoxColour2);
            this.groupBox4.Controls.Add(this.Colour2Btn);
            this.groupBox4.Location = new System.Drawing.Point(86, 7);
            this.groupBox4.Name = "groupBox4";
            this.groupBox4.Size = new System.Drawing.Size(120, 34);
            this.groupBox4.TabIndex = 1;
            this.groupBox4.TabStop = false;
            // 
            // SwapBtn
            // 
            this.SwapBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.SwapBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.SwapBtn.Location = new System.Drawing.Point(89, 9);
            this.SwapBtn.Name = "SwapBtn";
            this.SwapBtn.Size = new System.Drawing.Size(24, 22);
            this.SwapBtn.TabIndex = 2;
            this.toolTip1.SetToolTip(this.SwapBtn, "Swap Colour 1 with Colour 2");
            this.SwapBtn.MouseUp += new System.Windows.Forms.MouseEventHandler(this.SwapBtn_MouseUp);
            // 
            // checkBoxColour2
            // 
            this.checkBoxColour2.AutoSize = true;
            this.checkBoxColour2.Location = new System.Drawing.Point(4, 13);
            this.checkBoxColour2.Name = "checkBoxColour2";
            this.checkBoxColour2.Size = new System.Drawing.Size(15, 14);
            this.checkBoxColour2.TabIndex = 0;
            this.toolTip1.SetToolTip(this.checkBoxColour2, "Use Colour 2");
            this.checkBoxColour2.Click += new System.EventHandler(this.checkBoxColour2_Click);
            // 
            // groupBox3
            // 
            this.groupBox3.Controls.Add(this.Colour1Btn);
            this.groupBox3.Location = new System.Drawing.Point(6, 7);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new System.Drawing.Size(74, 34);
            this.groupBox3.TabIndex = 0;
            this.groupBox3.TabStop = false;
            // 
            // groupBox2
            // 
            this.groupBox2.Controls.Add(this.panel11);
            this.groupBox2.Controls.Add(this.panel9);
            this.groupBox2.Controls.Add(this.panel10);
            this.groupBox2.Controls.Add(this.panel8);
            this.groupBox2.Controls.Add(this.panel7);
            this.groupBox2.Controls.Add(this.panel6);
            this.groupBox2.Controls.Add(this.panel5);
            this.groupBox2.Controls.Add(this.panel4);
            this.groupBox2.Controls.Add(this.panel3);
            this.groupBox2.Controls.Add(this.panel2);
            this.groupBox2.Controls.Add(this.panel1);
            this.groupBox2.Controls.Add(this.panel0);
            this.groupBox2.Location = new System.Drawing.Point(9, 4);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new System.Drawing.Size(384, 233);
            this.groupBox2.TabIndex = 1;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "Patterns";
            // 
            // panel11
            // 
            this.panel11.BackColor = System.Drawing.Color.Red;
            this.panel11.Controls.Add(this.pictureBox11);
            this.panel11.Location = new System.Drawing.Point(280, 157);
            this.panel11.Name = "panel11";
            this.panel11.Size = new System.Drawing.Size(86, 66);
            this.panel11.TabIndex = 11;
            // 
            // panel9
            // 
            this.panel9.BackColor = System.Drawing.Color.Red;
            this.panel9.Controls.Add(this.pictureBox9);
            this.panel9.Location = new System.Drawing.Point(102, 157);
            this.panel9.Name = "panel9";
            this.panel9.Size = new System.Drawing.Size(86, 66);
            this.panel9.TabIndex = 9;
            // 
            // panel10
            // 
            this.panel10.BackColor = System.Drawing.Color.Red;
            this.panel10.Controls.Add(this.pictureBox10);
            this.panel10.Location = new System.Drawing.Point(191, 157);
            this.panel10.Name = "panel10";
            this.panel10.Size = new System.Drawing.Size(86, 66);
            this.panel10.TabIndex = 10;
            // 
            // panel8
            // 
            this.panel8.BackColor = System.Drawing.Color.Red;
            this.panel8.Controls.Add(this.pictureBox8);
            this.panel8.Location = new System.Drawing.Point(13, 157);
            this.panel8.Name = "panel8";
            this.panel8.Size = new System.Drawing.Size(86, 66);
            this.panel8.TabIndex = 8;
            // 
            // panel7
            // 
            this.panel7.BackColor = System.Drawing.Color.Red;
            this.panel7.Controls.Add(this.pictureBox7);
            this.panel7.Location = new System.Drawing.Point(280, 88);
            this.panel7.Name = "panel7";
            this.panel7.Size = new System.Drawing.Size(86, 66);
            this.panel7.TabIndex = 7;
            // 
            // panel6
            // 
            this.panel6.BackColor = System.Drawing.Color.Red;
            this.panel6.Controls.Add(this.pictureBox6);
            this.panel6.Location = new System.Drawing.Point(191, 88);
            this.panel6.Name = "panel6";
            this.panel6.Size = new System.Drawing.Size(86, 66);
            this.panel6.TabIndex = 6;
            // 
            // panel5
            // 
            this.panel5.BackColor = System.Drawing.Color.Red;
            this.panel5.Controls.Add(this.pictureBox5);
            this.panel5.Location = new System.Drawing.Point(102, 88);
            this.panel5.Name = "panel5";
            this.panel5.Size = new System.Drawing.Size(86, 66);
            this.panel5.TabIndex = 5;
            // 
            // panel4
            // 
            this.panel4.BackColor = System.Drawing.Color.Red;
            this.panel4.Controls.Add(this.pictureBox4);
            this.panel4.Location = new System.Drawing.Point(13, 88);
            this.panel4.Name = "panel4";
            this.panel4.Size = new System.Drawing.Size(86, 66);
            this.panel4.TabIndex = 4;
            // 
            // panel3
            // 
            this.panel3.BackColor = System.Drawing.Color.Red;
            this.panel3.Controls.Add(this.pictureBox3);
            this.panel3.Location = new System.Drawing.Point(280, 19);
            this.panel3.Name = "panel3";
            this.panel3.Size = new System.Drawing.Size(86, 66);
            this.panel3.TabIndex = 3;
            // 
            // panel2
            // 
            this.panel2.BackColor = System.Drawing.Color.Red;
            this.panel2.Controls.Add(this.pictureBox2);
            this.panel2.Location = new System.Drawing.Point(191, 19);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(86, 66);
            this.panel2.TabIndex = 2;
            // 
            // panel1
            // 
            this.panel1.BackColor = System.Drawing.Color.Red;
            this.panel1.Controls.Add(this.pictureBox1);
            this.panel1.Location = new System.Drawing.Point(102, 19);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(86, 66);
            this.panel1.TabIndex = 1;
            // 
            // panel0
            // 
            this.panel0.BackColor = System.Drawing.Color.Red;
            this.panel0.Controls.Add(this.pictureBox0);
            this.panel0.Location = new System.Drawing.Point(13, 19);
            this.panel0.Name = "panel0";
            this.panel0.Size = new System.Drawing.Size(86, 66);
            this.panel0.TabIndex = 0;
            // 
            // pictureBox11
            // 
            this.pictureBox11.BackColor = System.Drawing.Color.White;
            this.pictureBox11.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox11.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox11.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox11.Location = new System.Drawing.Point(3, 3);
            this.pictureBox11.Name = "pictureBox11";
            this.pictureBox11.Size = new System.Drawing.Size(80, 60);
            this.pictureBox11.TabIndex = 4;
            this.pictureBox11.TabStop = false;
            this.pictureBox11.Tag = "11";
            this.pictureBox11.DoubleClick += new System.EventHandler(this.pictureBoxAll_DoubleClick);
            this.pictureBox11.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxAll_MouseDown);
            // 
            // pictureBox9
            // 
            this.pictureBox9.BackColor = System.Drawing.Color.White;
            this.pictureBox9.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox9.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox9.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox9.Location = new System.Drawing.Point(3, 3);
            this.pictureBox9.Name = "pictureBox9";
            this.pictureBox9.Size = new System.Drawing.Size(80, 60);
            this.pictureBox9.TabIndex = 4;
            this.pictureBox9.TabStop = false;
            this.pictureBox9.Tag = "9";
            this.pictureBox9.DoubleClick += new System.EventHandler(this.pictureBoxAll_DoubleClick);
            this.pictureBox9.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxAll_MouseDown);
            // 
            // pictureBox10
            // 
            this.pictureBox10.BackColor = System.Drawing.Color.White;
            this.pictureBox10.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox10.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox10.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox10.Location = new System.Drawing.Point(3, 3);
            this.pictureBox10.Name = "pictureBox10";
            this.pictureBox10.Size = new System.Drawing.Size(80, 60);
            this.pictureBox10.TabIndex = 4;
            this.pictureBox10.TabStop = false;
            this.pictureBox10.Tag = "10";
            this.pictureBox10.DoubleClick += new System.EventHandler(this.pictureBoxAll_DoubleClick);
            this.pictureBox10.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxAll_MouseDown);
            // 
            // pictureBox8
            // 
            this.pictureBox8.BackColor = System.Drawing.Color.White;
            this.pictureBox8.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox8.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox8.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox8.Location = new System.Drawing.Point(3, 3);
            this.pictureBox8.Name = "pictureBox8";
            this.pictureBox8.Size = new System.Drawing.Size(80, 60);
            this.pictureBox8.TabIndex = 4;
            this.pictureBox8.TabStop = false;
            this.pictureBox8.Tag = "8";
            this.pictureBox8.DoubleClick += new System.EventHandler(this.pictureBoxAll_DoubleClick);
            this.pictureBox8.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxAll_MouseDown);
            // 
            // pictureBox7
            // 
            this.pictureBox7.BackColor = System.Drawing.Color.White;
            this.pictureBox7.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox7.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox7.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox7.Location = new System.Drawing.Point(3, 3);
            this.pictureBox7.Name = "pictureBox7";
            this.pictureBox7.Size = new System.Drawing.Size(80, 60);
            this.pictureBox7.TabIndex = 4;
            this.pictureBox7.TabStop = false;
            this.pictureBox7.Tag = "7";
            this.pictureBox7.DoubleClick += new System.EventHandler(this.pictureBoxAll_DoubleClick);
            this.pictureBox7.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxAll_MouseDown);
            // 
            // pictureBox6
            // 
            this.pictureBox6.BackColor = System.Drawing.Color.White;
            this.pictureBox6.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox6.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox6.Location = new System.Drawing.Point(3, 3);
            this.pictureBox6.Name = "pictureBox6";
            this.pictureBox6.Size = new System.Drawing.Size(80, 60);
            this.pictureBox6.TabIndex = 4;
            this.pictureBox6.TabStop = false;
            this.pictureBox6.Tag = "6";
            this.pictureBox6.DoubleClick += new System.EventHandler(this.pictureBoxAll_DoubleClick);
            this.pictureBox6.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxAll_MouseDown);
            // 
            // pictureBox5
            // 
            this.pictureBox5.BackColor = System.Drawing.Color.White;
            this.pictureBox5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox5.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox5.Location = new System.Drawing.Point(3, 3);
            this.pictureBox5.Name = "pictureBox5";
            this.pictureBox5.Size = new System.Drawing.Size(80, 60);
            this.pictureBox5.TabIndex = 4;
            this.pictureBox5.TabStop = false;
            this.pictureBox5.Tag = "5";
            this.pictureBox5.DoubleClick += new System.EventHandler(this.pictureBoxAll_DoubleClick);
            this.pictureBox5.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxAll_MouseDown);
            // 
            // pictureBox4
            // 
            this.pictureBox4.BackColor = System.Drawing.Color.White;
            this.pictureBox4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox4.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox4.Location = new System.Drawing.Point(3, 3);
            this.pictureBox4.Name = "pictureBox4";
            this.pictureBox4.Size = new System.Drawing.Size(80, 60);
            this.pictureBox4.TabIndex = 4;
            this.pictureBox4.TabStop = false;
            this.pictureBox4.Tag = "4";
            this.pictureBox4.DoubleClick += new System.EventHandler(this.pictureBoxAll_DoubleClick);
            this.pictureBox4.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxAll_MouseDown);
            // 
            // pictureBox3
            // 
            this.pictureBox3.BackColor = System.Drawing.Color.White;
            this.pictureBox3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox3.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox3.Location = new System.Drawing.Point(3, 3);
            this.pictureBox3.Name = "pictureBox3";
            this.pictureBox3.Size = new System.Drawing.Size(80, 60);
            this.pictureBox3.TabIndex = 4;
            this.pictureBox3.TabStop = false;
            this.pictureBox3.Tag = "3";
            this.pictureBox3.DoubleClick += new System.EventHandler(this.pictureBoxAll_DoubleClick);
            this.pictureBox3.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxAll_MouseDown);
            // 
            // pictureBox2
            // 
            this.pictureBox2.BackColor = System.Drawing.Color.White;
            this.pictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox2.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox2.Location = new System.Drawing.Point(3, 3);
            this.pictureBox2.Name = "pictureBox2";
            this.pictureBox2.Size = new System.Drawing.Size(80, 60);
            this.pictureBox2.TabIndex = 4;
            this.pictureBox2.TabStop = false;
            this.pictureBox2.Tag = "2";
            this.pictureBox2.DoubleClick += new System.EventHandler(this.pictureBoxAll_DoubleClick);
            this.pictureBox2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxAll_MouseDown);
            // 
            // pictureBox1
            // 
            this.pictureBox1.BackColor = System.Drawing.Color.White;
            this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox1.Location = new System.Drawing.Point(3, 3);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(80, 60);
            this.pictureBox1.TabIndex = 4;
            this.pictureBox1.TabStop = false;
            this.pictureBox1.Tag = "1";
            this.pictureBox1.DoubleClick += new System.EventHandler(this.pictureBoxAll_DoubleClick);
            this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxAll_MouseDown);
            // 
            // pictureBox0
            // 
            this.pictureBox0.BackColor = System.Drawing.Color.White;
            this.pictureBox0.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox0.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox0.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox0.Location = new System.Drawing.Point(3, 3);
            this.pictureBox0.Name = "pictureBox0";
            this.pictureBox0.Size = new System.Drawing.Size(80, 60);
            this.pictureBox0.TabIndex = 4;
            this.pictureBox0.TabStop = false;
            this.pictureBox0.Tag = "0";
            this.pictureBox0.DoubleClick += new System.EventHandler(this.pictureBoxAll_DoubleClick);
            this.pictureBox0.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxAll_MouseDown);
            // 
            // FrmBackground
            // 
            this.ClientSize = new System.Drawing.Size(402, 298);
            this.Controls.Add(this.groupBox2);
            this.Controls.Add(this.groupBox1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "FrmBackground";
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Background Colours and Patterns";
            this.groupBox1.ResumeLayout(false);
            this.groupBox4.ResumeLayout(false);
            this.groupBox4.PerformLayout();
            this.groupBox3.ResumeLayout(false);
            this.groupBox2.ResumeLayout(false);
            this.panel11.ResumeLayout(false);
            this.panel9.ResumeLayout(false);
            this.panel10.ResumeLayout(false);
            this.panel8.ResumeLayout(false);
            this.panel7.ResumeLayout(false);
            this.panel6.ResumeLayout(false);
            this.panel5.ResumeLayout(false);
            this.panel4.ResumeLayout(false);
            this.panel3.ResumeLayout(false);
            this.panel2.ResumeLayout(false);
            this.panel1.ResumeLayout(false);
            this.panel0.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox11)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox0)).EndInit();
            this.ResumeLayout(false);

		}
		public FrmBackground()
		{
			this.InitializeComponent();
			this.LoadData();
		}
		private void LoadData()
		{
			this.Text = (gf.ChangedIsDefault ? "Select Default Background Colours and Pattern" : "Background and Pattern for selected item");
			this.InColour1 = gf.ChangedBackColour1;
			this.InColour2 = gf.ChangedBackColour2;
			this.SelectedStyle = gf.ChangedBackStyle;
			this.PicWidth = this.pictureBox0.Width;
			this.PicHeight = this.pictureBox0.Height;
			this.Colour1Btn.ForeColor = this.InColour1;
			this.Colour2Btn.ForeColor = this.InColour2;
			this.checkBoxColour2.Checked = !(this.InColour1 == this.InColour2);
			this.Colour2Btn.Enabled = this.checkBoxColour2.Checked;
			this.SwapBtn.Enabled = this.Colour2Btn.Enabled;
			this.DrawAllPatterns();
		}
		private void DrawAllPatterns()
		{
			this.DrawPattern(this.pictureBox0, this.panel0);
			this.DrawPattern(this.pictureBox1, this.panel1);
			this.DrawPattern(this.pictureBox2, this.panel2);
			this.DrawPattern(this.pictureBox3, this.panel3);
			this.DrawPattern(this.pictureBox4, this.panel4);
			this.DrawPattern(this.pictureBox5, this.panel5);
			this.DrawPattern(this.pictureBox6, this.panel6);
			this.DrawPattern(this.pictureBox7, this.panel7);
			this.DrawPattern(this.pictureBox8, this.panel8);
			this.DrawPattern(this.pictureBox9, this.panel9);
			this.DrawPattern(this.pictureBox10, this.panel10);
			this.DrawPattern(this.pictureBox11, this.panel11);
			this.SetBorder(this.SelectedStyle);
		}
		private void DrawPattern(PictureBox InPictureBox, Panel InPanel)
		{
			string text = "";
			int inStyle = gf.StringToInt((string)InPictureBox.Tag);
			Image image = new Bitmap(this.PicWidth, this.PicHeight);
			Graphics graphics = Graphics.FromImage(image);
			gf.BackPattern.Fill(ref graphics, this.InColour1, this.InColour2, inStyle, this.PicWidth, this.PicHeight, ref text);
			InPictureBox.BackgroundImage = image;
			InPanel.BackColor = this.BackColor;
		}
		private void SetBorder(int InStyle)
		{
			this.panel0.BackColor = ((gf.StringToInt((string)this.pictureBox0.Tag) == InStyle) ? Color.Red : this.BackColor);
			this.panel1.BackColor = ((gf.StringToInt((string)this.pictureBox1.Tag) == InStyle) ? Color.Red : this.BackColor);
			this.panel2.BackColor = ((gf.StringToInt((string)this.pictureBox2.Tag) == InStyle) ? Color.Red : this.BackColor);
			this.panel3.BackColor = ((gf.StringToInt((string)this.pictureBox3.Tag) == InStyle) ? Color.Red : this.BackColor);
			this.panel4.BackColor = ((gf.StringToInt((string)this.pictureBox4.Tag) == InStyle) ? Color.Red : this.BackColor);
			this.panel5.BackColor = ((gf.StringToInt((string)this.pictureBox5.Tag) == InStyle) ? Color.Red : this.BackColor);
			this.panel6.BackColor = ((gf.StringToInt((string)this.pictureBox6.Tag) == InStyle) ? Color.Red : this.BackColor);
			this.panel7.BackColor = ((gf.StringToInt((string)this.pictureBox7.Tag) == InStyle) ? Color.Red : this.BackColor);
			this.panel8.BackColor = ((gf.StringToInt((string)this.pictureBox8.Tag) == InStyle) ? Color.Red : this.BackColor);
			this.panel9.BackColor = ((gf.StringToInt((string)this.pictureBox9.Tag) == InStyle) ? Color.Red : this.BackColor);
			this.panel10.BackColor = ((gf.StringToInt((string)this.pictureBox10.Tag) == InStyle) ? Color.Red : this.BackColor);
			this.panel11.BackColor = ((gf.StringToInt((string)this.pictureBox11.Tag) == InStyle) ? Color.Red : this.BackColor);
		}
		private void Colour1_MouseUp(object sender, MouseEventArgs e)
		{
			if (gf.SelectColorFromBtn(ref this.Colour1Btn, ref this.InColour1))
			{
				if (!this.checkBoxColour2.Checked)
				{
					this.SetColour2As1();
				}
				this.DrawAllPatterns();
			}
		}
		private void Colour2_MouseUp(object sender, MouseEventArgs e)
		{
			if (gf.SelectColorFromBtn(ref this.Colour2Btn, ref this.InColour2))
			{
				this.DrawAllPatterns();
			}
		}
		private void pictureBoxAll_MouseDown(object sender, MouseEventArgs e)
		{
			PictureBox pictureBox = (PictureBox)sender;
			this.SelectedStyle = gf.StringToInt((string)pictureBox.Tag);
			this.SetBorder(this.SelectedStyle);
		}
		private void checkBoxColour2_Click(object sender, EventArgs e)
		{
			this.SetColour2As1();
			this.DrawAllPatterns();
		}
		private void SetColour2As1()
		{
			this.Colour2Btn.Enabled = this.checkBoxColour2.Checked;
			this.Colour2Btn.ForeColor = this.Colour1Btn.ForeColor;
			this.InColour2 = this.Colour2Btn.ForeColor;
			this.SwapBtn.Enabled = this.Colour2Btn.Enabled;
		}
		private void pictureBoxAll_DoubleClick(object sender, EventArgs e)
		{
			this.UseNewSettingsAndExit();
		}
		private void OkBtn_Click(object sender, EventArgs e)
		{
			this.UseNewSettingsAndExit();
		}
		private void UseNewSettingsAndExit()
		{
			gf.ChangedBackColour1 = this.InColour1;
			gf.ChangedBackColour2 = this.InColour2;
			gf.ChangedBackStyle = this.SelectedStyle;
			base.DialogResult = DialogResult.OK;
			base.Close();
		}
		private void SwapBtn_MouseUp(object sender, MouseEventArgs e)
		{
			if (this.Colour2Btn.Enabled)
			{
				this.InColour1 = this.Colour2Btn.ForeColor;
				this.InColour2 = this.Colour1Btn.ForeColor;
				this.Colour1Btn.ForeColor = this.InColour1;
				this.Colour2Btn.ForeColor = this.InColour2;
				this.DrawAllPatterns();
			}
		}

        private void CancelBtn_Click(object sender, EventArgs e)
        {
            base.Close();
        }
	}
}
